<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8" isELIgnored="false"%>
<%@ include file="/WEB-INF/views/shared/taglib.jsp"%>
<div class="table-responsive">
<table class="cntable table table-bordered dataTable table-shareBrokerage">
	<thead>
		<tr>
			<th style="width:50px">序号</th>
			<th style="width:130px">客户编号</th>
			<th style="width:100px">客户名</th>
			<th style="width:100px">推荐人编号</th>
			<th style="width:100px">团队层次(相对于分润人)</th>
			<th style="width:100px">客户级别</th>
			<th style="width:100px">推广奖百分比</th>
			<th style="width:100px">一级分享奖百分比</th>
			<th style="width:100px">二级分享奖百分比</th>
			<th style="width:100px">服务奖百分比</th>
			<th style="width:100px">孵化奖百分比</th>
			<th style="width:100px">应得金额</th>		
		</tr>
	</thead>
	<tbody>
	<c:set value="" var="group" />
		<c:forEach var="carShareBrokerage" items="${carShareBrokerages}" varStatus="status">
			
			<c:if test="${carShareBrokerage.groupNum ne group}">
				<tr class="no-sel">
					<td colspan="12" style="margin-top:40px"></td>
			    </tr>
				<tr class="no-sel">
					<td colspan="10" style="padding: 3px 10px;">
						<span class="h6">
							消费者:<i class="text-warning-700">${carShareBrokerage.customerName}</i>,
							商业险保费<i class="text-warning-700">${carShareBrokerage.money}</i>,
							提成百分比<i class="text-warning-700"><fmt:formatNumber pattern="##.#%" maxIntegerDigits="3" value="${carShareBrokerage.proportion}" /></i>,
							税后可分配佣金<i class="text-warning-700">${carShareBrokerage.shareMoney}</i>,
							消费日期<i class="text-warning-700"><fmt:formatDate value="${carShareBrokerage.generateDate}" type="date" dateStyle="default" pattern="yyyy-MM-dd HH:mm:ss"/></i>
							&nbsp;&nbsp;&nbsp;&nbsp;任务号:<i class="text-warning-700">${carShareBrokerage.taskId}</i>,
							&nbsp;&nbsp;&nbsp;&nbsp;商业险保单号:<i class="text-warning-700">${carShareBrokerage.bizInsureInfoPolicyNo}</i>
						</span>
					</td>
					<td>
					<c:if test="${carShareBrokerage.confirmState eq 'unConfirm'}">
						<ul class="icons-list">
							<li><a href="javascript:onConfirm('${carShareBrokerage.carBrokerageId}')" title="点击确认"><i class="icon-checkmark-circle2 text-primary"></i></a></li>
						</ul>
					</c:if>
					</td>
					<td>
					<c:if test="${carShareBrokerage.confirmState eq 'unConfirm'}">待确认
					</c:if>
					<c:if test="${carShareBrokerage.confirmState eq 'confirmed'}">已确认
					</c:if>
					</td>
				</tr>
				<c:set value="${carShareBrokerage.groupNum}" var="group" />
			</c:if>
			<tr data-id="${carShareBrokerage.id}">
				<td>${status.index+1}</td>
				<td>${carShareBrokerage.userIdentity}</td>
				<td>${carShareBrokerage.customerName}</td>
				<td>${carShareBrokerage.refereeIdentity}</td>
				<c:choose>
		       		<c:when test="${carShareBrokerage.sort == 0}">
		       		<td>消费人</td>
		       		</c:when>
		       		<c:otherwise>
		       		<td>消费人前${carShareBrokerage.sort}级</td>
		       		</c:otherwise>
		        </c:choose>	
				<td>
				    <t:provider packageName="cust" enumClassName="CustomerLevel" value="${carShareBrokerage.customerLevel}"/>
                </td>
				<td><fmt:formatNumber pattern="##.#%" maxIntegerDigits="3" value="${carShareBrokerage.promote}" /></td>
				<td><fmt:formatNumber pattern="##.#%" maxIntegerDigits="3" value="${carShareBrokerage.firstShare}" /></td>
				<td><fmt:formatNumber pattern="##.#%" maxIntegerDigits="3" value="${carShareBrokerage.secondShare}" /></td>
				<td><fmt:formatNumber pattern="##.#%" maxIntegerDigits="3" value="${carShareBrokerage.server}" /></td>
				<td><fmt:formatNumber pattern="##.#%" maxIntegerDigits="3" value="${carShareBrokerage.hatch}" /></td>
				<td><fmt:formatNumber value="${carShareBrokerage.recieveMoney}" pattern="#.##" minFractionDigits="2" > </fmt:formatNumber></td>
			</tr>
			
		</c:forEach>
	</tbody>
	<tfoot>
		<tr>
			<th class="pager-th absolute-pos">
				<%@ include file="/WEB-INF/views/shared/master/pager.jsp"%>
			</th>
		</tr>
	</tfoot>
</table>
</div>

